package tds.model16;
/**
 * @Company 杭州先锋电子技术股份有限公司
 * @ClassName Client
 * @Description TODO（这里用一句话描述这个类的作用)
 * @author tds
 * @Date 2020/2/1 23:00
 * @version 1.0.0
 */
public class Client {
    public static void main(String[] args) {
        // 低端汽车工厂创建引擎
        CarFactory carFactory = new LowCarFactory();
        Engine engine = carFactory.createEngine();
        engine.run();
        engine.start();

        // 高端汽车工厂创建引擎
        CarFactory luxuryCarFactory = new LuxuryCarFactory();
        Engine luxuryEngine = luxuryCarFactory.createEngine();
        luxuryEngine.run();
        luxuryEngine.start();
    }
}
